# from s2 import add_num
# from s2 import add_3_num
# print(add_num(2,3))
# print(add_3_num(2,3,5))
# class Aminal:
#     def __init__(self,name,age):
#         self.name=name
#         self.age=age
#     def eat(self):
#         print(f'{self.name}在吃.....')
#     def sleep(self):
#         print(f'{self.name}在睡觉....')
# class Cat(Aminal):
#     def catch(self):
#         print(f'{self.name}在抓老鼠....')
# class Dog(Aminal):
#
#     def bark(self):
#         print(f'{self.name}在汪汪叫...')
#     def look_door(self):
#         print(f'{self.name}在看门....')
# class Xtq(Dog):
#     def __init__(self,name,age,fali):
#         super().__init__(name,age)
#         self.fali=fali
#     def bark(self):
#         print(f'{self.name}嗷嗷叫...')
#     def fly(self):
#         print(f'{self.name}在飞行...')
# ani=Aminal('大黄',3)
# ani.eat()
# ani.sleep()
# cat=Cat('小白',22)
# cat.catch()
# cat.sleep()
# dog=Dog('小狗',12)
# dog.look_door()
# dog.eat()
# xtq=Xtq('哮天犬',99,9199291)
# xtq.eat()
# xtq.sleep()
# xtq.fly()
# dog.bark()
# xtq.bark()
# xtq.look_door()
# class Tools:
#     count=0
#     def __init__(self,name):
#         self.name=name
#         Tools.count+=1
#     @classmethod
#     def show_tool_count(cls):
#         print(f'当前的对象个数为：{cls.count}')
#     @staticmethod
#     def show_info_count():
#         print('这是一个工具类')
# Tools.show_tool_count()
# t1=Tools('小白')
# t1.show_tool_count()
# Tools.show_info_count()
# t1.show_info_count()
import random


class Game:
    top_score=0
    def __init__(self,name):
        self.player_name=name
    @staticmethod
    def show_help():
        print('这是帮助信息')
    @classmethod
    def show_top_score(cls):
        print(f'历史最高分{cls.top_score}')
    def star_game(self):
        print(f'玩家{self.player_name}开始游戏')
        score=random.randint(10,100)
        print(f'玩家{self.player_name}本次最高分为：{score}')
        if(score>Game.top_score):
            Game.top_score=score
if __name__ == '__main__':
    Game.show_help()
    Game.show_top_score()
    player=Game('小王')
    player.star_game()
    player.show_top_score()
    player.star_game()
    player.show_top_score()














